function labelthumbs(e) {
	document.write('<ul id="label_with_thumbs">');
	for (var t = 0; t < numposts; t++) {
		var n = e.feed.entry[t];
		var r = n.title.$t;
		var i;
		if (t == e.feed.entry.length) break;
		for (var o = 0; o < n.link.length; o++) {
			if (n.link[o].rel == "replies" && n.link[o].type == "text/html") {
				var u = n.link[o].title;
				var f = n.link[o].href
			}
			if (n.link[o].rel == "alternate") {
				i = n.link[o].href;
				break
			}
		}
		var l;
		try {
			l = n.media$thumbnail.url
		} catch(h) {
			s = n.content.$t;
			a = s.indexOf("<img");
			b = s.indexOf('src="', a);
			c = s.indexOf('"', b + 5);
			d = s.substr(b + 5, c - b - 5);
			if (a != -1 && b != -1 && c != -1 && d != "") {
				l = d
			} else l = "http://3.bp.blogspot.com/-zP87C2q9yog/UVopoHY30SI/AAAAAAAAE5k/AIyPvrpGLn8/s1600/picture_not_available.png"
		}
		var p = n.published.$t;
		var v = p.substring(0, 4);
		var m = p.substring(5, 7);
		var g = p.substring(8, 10);
		var y = new Array;
		y[1] = "Jan";
		y[2] = "Feb";
		y[3] = "Mar";
		y[4] = "Apr";
		y[5] = "May";
		y[6] = "June";
		y[7] = "July";
		y[8] = "Aug";
		y[9] = "Sept";
		y[10] = "Oct";
		y[11] = "Nov";
		y[12] = "Dec";
		document.write('<li class="recent-box">');
		if (showpostthumbnails == true) document.write('<div class="imageContainer"><a href="' + i + '" target ="_top"><img class="label_thumb" src="' + l + '" title="' + r + '" alt="' + r + '"/></a></div>');
		document.write('<a class="label_title" href="' + i + '" target ="_top">' + r + "</a>");
		var w = "";
		var E = 0;
		document.write("");
		p = n.published.$t;
		var S = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
		var x = ["Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec"];
		var T = p.split("-")[2].substring(0, 2);
		var N = p.split("-")[1];
		var C = p.split("-")[0];
		for (var k = 0; k < S.length; k++) {
			if (parseInt(N) == S[k]) {
				N = x[k];
				break
			}
		}
		var L = T + " " + N + " " + C;
		if (showpostdate == true) {
			document.write('<div class="toe"><a href="' + i + '" class="post-date">' + L + "</a>")
		}
		if (showcommentnum == true) {
			if (E == 1) {
				w = w + " | "
			}
			if (u == "1 Comments") u = "1 Comment";
			if (u == "0 Comments") u = "No Comments";
			w = w + u;
			E = 1;
			document.write('<a class="recent-com" href="' + f + '" target ="_top">' + u + "</a></div>")
		}
		if ("content" in n) {
			var A = n.content.$t
		} else if ("summary" in n) {
			var A = n.summary.$t
		} else var A = "";
		var O = /<\S[^>]*>/g;
		A = A.replace(O, "");
		if (showpostsummary == true) {
			if (A.length < numchars) {
				document.write("");
				document.write(A);
				document.write("")
			} else {
				document.write("");
				A = A.substring(0, numchars);
				var M = A.lastIndexOf(" ");
				A = A.substring(0, M);
				document.write('<p class="post-summary">' + A + "...</p>")
			}
		}
		document.write("</li>");
		if (t != numposts - 1) document.write("")
	}
	document.write("</ul>")
};
$(document).ready(function () {
	$('.label_thumb').attr('src', function (i, src) {
		return src.replace('s72-c', 's1600')
	})
});
$(document).ready(function () {
	$('.label_thumb').attr('src', function (i, src) {
		return src.replace('default.jpg', 'mqdefault.jpg')
	})
});
$(document).ready(function () {
	$('.popular-posts .item-thumbnail img, .post-home img, .feature-posts img').attr('src', function (i, src) {
		return src.replace('s72-c', 's1600')
	})
});
$(document).ready(function () {
	$('.popular-posts .item-thumbnail img, .post-home img, .feature-posts img').attr('src', function (i, src) {
		return src.replace('default.jpg', 'mqdefault.jpg')
	})
});
imgr = new Array();
imgr[0] = "http://2.bp.blogspot.com/-ex3V86fj4dQ/UrCQQa4cLsI/AAAAAAAAFdA/j2FCTmGOrog/s1600/no-thumbnail.png";
showRandomImg = true;
aBold = true;
summaryPost = 400;
summaryTitle = 20;
numposts1 = 12;
numposts2 = 4;
function removeHtmlTag(strx, chop) {
	var s = strx.split("<");
	for (var i = 0; i < s.length; i++) {
		if (s[i].indexOf(">") != -1) {
			s[i] = s[i].substring(s[i].indexOf(">") + 1, s[i].length)
		}
	}
	s = s.join("");
	s = s.substring(0, chop - 1);
	return s
}
function showrecentposts1(json) {
	j = (showRandomImg) ? Math.floor((imgr.length + 1) * Math.random()) : 0;
	img = new Array();
	if (numposts2 <= json.feed.entry.length) {
		maxpost = numposts2
	} else {
		maxpost = json.feed.entry.length
	}
	for (var i = 0; i < maxpost; i++) {
		var entry = json.feed.entry[i];
		var posttitle = entry.title.$t;
		var pcm;
		var posturl;
		if (i == json.feed.entry.length) break;
		for (var k = 0; k < entry.link.length; k++) {
			if (entry.link[k].rel == 'alternate') {
				posturl = entry.link[k].href;
				break
			}
		}
		for (var k = 0; k < entry.link.length; k++) {
			if (entry.link[k].rel == 'replies' && entry.link[k].type == 'text/html') {
				pcm = entry.link[k].title.split(" ")[0];
				break
			}
		}
		if ("content" in entry) {
			var postcontent = entry.content.$t
		} else if ("summary" in entry) {
			var postcontent = entry.summary.$t
		} else var postcontent = "";
		postdate = entry.published.$t;
		if (j > imgr.length - 1) j = 0;
		img[i] = imgr[j];
		s = postcontent;
		a = s.indexOf("<img");
		b = s.indexOf("src=\"", a);
		c = s.indexOf("\"", b + 5);
		d = s.substr(b + 5, c - b - 5);
		if ((a != -1) && (b != -1) && (c != -1) && (d != "")) img[i] = d;
		var month = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
		var month2 = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
		var day = postdate.split("-")[2].substring(0, 2);
		var m = postdate.split("-")[1];
		var y = postdate.split("-")[0];
		for (var u2 = 0; u2 < month.length; u2++) {
			if (parseInt(m) == month[u2]) {
				m = month2[u2];
				break
			}
		}
		var daystr = day + ' ' + m + ' ' + y;
		pcm = '<a href="' + posturl + '">' + pcm + ' comments</a>';
		var trtd = '<div class="col_maskolis"><h2 class="posttitle"><a href="' + posturl + '">' + posttitle + '</a></h2><a href="' + posturl + '"><img class="related_img" src="' + img[i] + '"/></a><div class="clear"></div></div>';
		document.write(trtd);
		j++
	}
}
var relatedTitles = new Array();
var relatedTitlesNum = 0;
var relatedUrls = new Array();
var thumburl = new Array();
function related_results_labels_thumbs(json) {
	for (var i = 0; i < json.feed.entry.length; i++) {
		var entry = json.feed.entry[i];
		relatedTitles[relatedTitlesNum] = entry.title.$t;
		try {
			thumburl[relatedTitlesNum] = entry.gform_foot.url
		} catch(error) {
			s = entry.content.$t;
			a = s.indexOf("<img");
			b = s.indexOf("src=\"", a);
			c = s.indexOf("\"", b + 5);
			d = s.substr(b + 5, c - b - 5);
			if ((a != -1) && (b != -1) && (c != -1) && (d != "")) {
				thumburl[relatedTitlesNum] = d
			} else thumburl[relatedTitlesNum] = 'http://2.bp.blogspot.com/-ex3V86fj4dQ/UrCQQa4cLsI/AAAAAAAAFdA/j2FCTmGOrog/s1600/no-thumbnail.png'
		}
		if (relatedTitles[relatedTitlesNum].length > 35) relatedTitles[relatedTitlesNum] = relatedTitles[relatedTitlesNum].substring(0, 35) + "...";
		for (var k = 0; k < entry.link.length; k++) {
			if (entry.link[k].rel == 'alternate') {
				relatedUrls[relatedTitlesNum] = entry.link[k].href;
				relatedTitlesNum++
			}
		}
	}
}
function removeRelatedDuplicates_thumbs() {
	var tmp = new Array(0);
	var tmp2 = new Array(0);
	var tmp3 = new Array(0);
	for (var i = 0; i < relatedUrls.length; i++) {
		if (!contains_thumbs(tmp, relatedUrls[i])) {
			tmp.length += 1;
			tmp[tmp.length - 1] = relatedUrls[i];
			tmp2.length += 1;
			tmp3.length += 1;
			tmp2[tmp2.length - 1] = relatedTitles[i];
			tmp3[tmp3.length - 1] = thumburl[i]
		}
	}
	relatedTitles = tmp2;
	relatedUrls = tmp;
	thumburl = tmp3
}
function contains_thumbs(a, e) {
	for (var j = 0; j < a.length; j++) if (a[j] == e) return true;
	return false
}
function printRelatedLabels_thumbs() {
	for (var i = 0; i < relatedUrls.length; i++) {
		if ((relatedUrls[i] == currentposturl) || (!(relatedTitles[i]))) {
			relatedUrls.splice(i, 1);
			relatedTitles.splice(i, 1);
			thumburl.splice(i, 1);
			i--
		}
	}
	var r = Math.floor((relatedTitles.length - 1) * Math.random());
	var i = 0;
	if (relatedTitles.length > 0) document.write('<h2>' + relatedpoststitle + '</h2>');
	document.write('<div style="clear: both;"/>');
	while (i < relatedTitles.length && i < 20 && i < maxresults) {
		document.write('<a style="text-decoration:none;margin:0 0 10px 4px;float:left;');
		if (i != 0) document.write('"');
		else document.write('"');
		document.write(' href="' + relatedUrls[r] + '"><img class="related_img" src="' + thumburl[r] + '"/><br/><div id="related-title">' + relatedTitles[r] + '</div></a>');
		if (r < relatedTitles.length - 1) {
			r++
		} else {
			r = 0
		}
		i++
	}
	document.write('</div>');
	relatedUrls.splice(0, relatedUrls.length);
	thumburl.splice(0, thumburl.length);
	relatedTitles.splice(0, relatedTitles.length)
};
(function (e) {
	var t = {
		topSpacing: 0,
		bottomSpacing: 0,
		className: "is-sticky",
		wrapperClassName: "sticky-wrapper",
		center: false,
		getWidthFrom: ""
	},
	n = e(window),
	r = e(document),
	i = [],
	s = n.height(),
	o = function () {
		var t = n.scrollTop(),
		o = r.height(),
		u = o - s,
		a = t > u ? u - t: 0;
		for (var f = 0; f < i.length; f++) {
			var l = i[f],
			c = l.stickyWrapper.offset().top,
			h = c - l.topSpacing - a;
			if (t <= h) {
				if (l.currentTop !== null) {
					l.stickyElement.css("position", "").css("top", "");
					l.stickyElement.parent().removeClass(l.className);
					l.currentTop = null
				}
			} else {
				var p = o - l.stickyElement.outerHeight() - l.topSpacing - l.bottomSpacing - t - a;
				if (p < 0) {
					p = p + l.topSpacing
				} else {
					p = l.topSpacing
				}
				if (l.currentTop != p) {
					l.stickyElement.css("position", "fixed").css("top", p);
					if (typeof l.getWidthFrom !== "undefined") {
						l.stickyElement.css("width", e(l.getWidthFrom).width())
					}
					l.stickyElement.parent().addClass(l.className);
					l.currentTop = p
				}
			}
		}
	},
	u = function () {
		s = n.height()
	},
	a = {
		init: function (n) {
			var r = e.extend(t, n);
			return this.each(function () {
				var t = e(this);
				var n = t.attr("id");
				var s = e("<div></div>").attr("id", n + "-sticky-wrapper").addClass(r.wrapperClassName);
				t.wrapAll(s);
				if (r.center) {
					t.parent().css({
						width: t.outerWidth(),
						marginLeft: "auto",
						marginRight: "auto"
					})
				}
				if (t.css("float") == "right") {
					t.css({
						"float": "none"
					}).parent().css({
						"float": "right"
					})
				}
				var o = t.parent();
				o.css("height", t.outerHeight());
				i.push({
					topSpacing: r.topSpacing,
					bottomSpacing: r.bottomSpacing,
					stickyElement: t,
					currentTop: null,
					stickyWrapper: o,
					className: r.className,
					getWidthFrom: r.getWidthFrom
				})
			})
		},
		update: o,
		unstick: function (t) {
			return this.each(function () {
				var t = e(this);
				removeIdx = -1;
				for (var n = 0; n < i.length; n++) {
					if (i[n].stickyElement.get(0) == t.get(0)) {
						removeIdx = n
					}
				}
				if (removeIdx != -1) {
					i.splice(removeIdx, 1);
					t.unwrap();
					t.removeAttr("style")
				}
			})
		}
	};
	if (window.addEventListener) {
		window.addEventListener("scroll", o, false);
		window.addEventListener("resize", u, false)
	} else if (window.attachEvent) {
		window.attachEvent("onscroll", o);
		window.attachEvent("onresize", u)
	}
	e.fn.sticky = function (t) {
		if (a[t]) {
			return a[t].apply(this, Array.prototype.slice.call(arguments, 1))
		} else if (typeof t === "object" || !t) {
			return a.init.apply(this, arguments)
		} else {
			e.error("Method " + t + " does not exist on jQuery.sticky")
		}
	};
	e.fn.unstick = function (t) {
		if (a[t]) {
			return a[t].apply(this, Array.prototype.slice.call(arguments, 1))
		} else if (typeof t === "object" || !t) {
			return a.unstick.apply(this, arguments)
		} else {
			e.error("Method " + t + " does not exist on jQuery.sticky")
		}
	};
	e(function () {
		setTimeout(o, 0)
	})
})(jQuery);
$(document).ready(function () {
	$("#sbar").sticky({
		topSpacing: 0
	})
});
(function (e, t, n, r) {
	var i = function (r, i) {
		this.elem = r;
		this.$elem = e(r);
		this.options = i;
		this.metadata = this.$elem.data("plugin-options");
		this.$win = e(t);
		this.sections = {};
		this.didScroll = false;
		this.$doc = e(n);
		this.docHeight = this.$doc.height()
	};
	i.prototype = {
		defaults: {
			navItems: "a",
			currentClass: "current",
			changeHash: false,
			easing: "swing",
			filter: "",
			scrollSpeed: 750,
			scrollThreshold: .5,
			begin: false,
			end: false,
			scrollChange: false
		},
		init: function () {
			this.config = e.extend({},
			this.defaults, this.options, this.metadata);
			this.$nav = this.$elem.find(this.config.navItems);
			if (this.config.filter !== "") {
				this.$nav = this.$nav.filter(this.config.filter)
			}
			this.$nav.on("click.onePageNav", e.proxy(this.handleClick, this));
			this.getPositions();
			this.bindInterval();
			this.$win.on("resize.onePageNav", e.proxy(this.getPositions, this));
			return this
		},
		adjustNav: function (e, t) {
			e.$elem.find("." + e.config.currentClass).removeClass(e.config.currentClass);
			t.addClass(e.config.currentClass)
		},
		bindInterval: function () {
			var e = this;
			var t;
			e.$win.on("scroll.onePageNav", function () {
				e.didScroll = true
			});
			e.t = setInterval(function () {
				t = e.$doc.height();
				if (e.didScroll) {
					e.didScroll = false;
					e.scrollChange()
				}
				if (t !== e.docHeight) {
					e.docHeight = t;
					e.getPositions()
				}
			},
			250)
		},
		getHash: function (e) {
			return e.attr("href").split("#")[1]
		},
		getPositions: function () {
			var t = this;
			var n;
			var r;
			var i;
			t.$nav.each(function () {
				n = t.getHash(e(this));
				i = e("#" + n);
				if (i.length) {
					r = i.offset().top;
					t.sections[n] = Math.round(r)
				}
			})
		},
		getSection: function (e) {
			var t = null;
			var n = Math.round(this.$win.height() * this.config.scrollThreshold);
			for (var r in this.sections) {
				if (this.sections[r] - n < e) {
					t = r
				}
			}
			return t
		},
		handleClick: function (n) {
			var r = this;
			var i = e(n.currentTarget);
			var s = i.parent();
			var o = "#" + r.getHash(i);
			if (!s.hasClass(r.config.currentClass)) {
				if (r.config.begin) {
					r.config.begin()
				}
				r.adjustNav(r, s);
				r.unbindInterval();
				r.scrollTo(o, function () {
					if (r.config.changeHash) {
						t.location.hash = o
					}
					r.bindInterval();
					if (r.config.end) {
						r.config.end()
					}
				})
			}
			n.preventDefault()
		},
		scrollChange: function () {
			var e = this.$win.scrollTop();
			var t = this.getSection(e);
			var n;
			if (t !== null) {
				n = this.$elem.find('a[href$="#' + t + '"]').parent();
				if (!n.hasClass(this.config.currentClass)) {
					this.adjustNav(this, n);
					if (this.config.scrollChange) {
						this.config.scrollChange(n)
					}
				}
			}
		},
		scrollTo: function (t, n) {
			var r = e(t).offset().top;
			e("html, body").animate({
				scrollTop: r
			},
			this.config.scrollSpeed, this.config.easing, n)
		},
		unbindInterval: function () {
			clearInterval(this.t);
			this.$win.unbind("scroll.onePageNav")
		}
	};
	i.defaults = i.prototype.defaults;
	e.fn.onePageNav = function (e) {
		return this.each(function () { (new i(this, e)).init()
		})
	}
})(jQuery, window, document);
$(document).ready(function () {
	$('#nav').onePageNav()
});
$(window).load(function () {
	$("#preloader").fadeOut("slow")
});
$(document).ready(function () {
	$("#header").clone().prependTo("#sbar .woo")
});
$(document).ready(function () {
	$('#mycontent').html('<a href="http://www.google.com/+AlexDenverDEZ/about">Alex DEZ</a>');
	setInterval(function () {
		if (!$('#mycontent:visible').length) window.location.href = 'http://www.waatizz.com/'
	},
	3000)
})

